﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Chat_D_LuX_Client.Controls
{
    /// <summary>
    /// Interaction logic for ucRoom.xaml
    /// </summary>
    public partial class ucRoom : UserControl
    {
        long _id;
        string _name;
        string _description;

        public event EventHandler JoinRoom;

        public ucRoom(long ID, string Name, string Description)
        {
            _id = ID;
            _name = Name;
            _description = Description;

            InitializeComponent();

            txtName.Text = _name;
            txtDescription.Text = _description;
            txtNumUsers.Text = "N/A";
        }

        private void UserControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (this.JoinRoom != null)
                JoinRoom(sender, e);
        }
    }
}
